class inn{

	public int[][] inn;
	private int size;
	public int top;
	public int x,y;

	public inn(){
		size = 100;
		top = 0;
		inn = new int[size][2];
		this.initInn();
	}
	public inn(int n){
		size = n;
		top = 0;
		inn = new int[size][2];
		this.initInn();
	}

	private void initInn(){
		for(int i=0;i<size;i++) {
			this.inn[i][0] = -5;
			this.inn[i][1] = -5;
		}
	}

	public int getLength(){
		return top-1;
	}

	public void push(int x,int y){
		if(top>99) top = 0;
		this.inn[top][0] = x;
		this.inn[top++][1] = y;
		this.x = x;
		this.y = y;
	}

	public void pop(){
		if(top>99) top = 0;
		this.x = inn[--top][0];
		this.y = inn[top][1];
		this.inn[top][0] = -5;
		this.inn[top][1] =-5;
	}
	public void printInn(){
		for(int i=0;i<size;i++) System.out.println(inn[i][0]+" , "+inn[i][1]);
	}
}
